//
//  UIImage+NailImage.h
//  familyeducation
//
//  Created by 聂志康 on 2017/2/22.
//  Copyright © 2017年 shangdingkeji. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>

typedef NS_ENUM(NSUInteger, GradientType) {
	GradientTypeTopToBottom = 0,//从上到小
	GradientTypeLeftToRight = 1,//从左到右
	GradientTypeUpleftToLowright = 2,//左上到右下
	GradientTypeUprightToLowleft = 3,//右上到左下
};

@interface UIImage (NailImage)
+ (UIImage*)thumbnailImageForVideo:(NSURL *)videoURL atTime:(NSTimeInterval)time;

+ (UIImage *)qrImageForString:(NSString *)string imageSize:(CGFloat)Imagesize logoImage:(UIImage *)logoImage logoImageSize:(CGFloat)waterImagesize;

+ (UIImage *)gradientColorImageFromColors:(NSArray*)colors gradientType:(GradientType)gradientType imgSize:(CGSize)imgSize;

+ (UIImage *)imageWithColor:(UIColor *)color;

+ (UIImage *)imageWithColor:(UIColor *)color andRect:(CGRect)rect;

+ (UIImage *)imageFromView:(UIView *)theView atFrame:(CGRect)r;

+ (UIImage *)imageByApplyingAlpha:(CGFloat)alpha  image:(UIImage*)image;

+ (UIImage *)scaleImage:(UIImage *)image width:(NSInteger)width height:(NSInteger)height;

+ (UIColor*)mostColor:(UIImage*)image;

+ (UIImage*)maskImage:(UIImage *)image withMask:(UIImage *)maskImage;

+ (UIImage *)changeImage:(UIImage *)image withBrightness:(CGFloat)brightness withSaturation:(CGFloat)saturation withContrast:(CGFloat)contrast;

@end
